import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘国水
 * Date: 2025-06-01
 * Time: 13:50
 */
public class test {
    public static void Change(int[] array) {
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array.length-1-i; j++) {
                if(array[j] > array[j+1]) {
                    int tmp = array[j];
                    array[j] = array[j+1];
                    array[j+1] = tmp;
                }
            }
        }
    }

    public static void GetArray(int[] array,int[] array1,int[] array2,int x, int y) {
        for (int i = 0; i < x ; i++) {
            array[i] = array1[i];
        }

        for (int i = 0; i < y-1; i++) {
            array[x+i] = array2[i];
        }
    }

    public static void main(String[] args) {
        int[] array1 = {1,60,50,45,63,10,9,7,52};
        int[] array2 = {2,3,5,8,4,99,51,30,11,12};
        int[] array  = new int[array1.length + array2.length - 1];
        Change(array1);
        Change(array2);
        GetArray(array,array1,array2,array1.length,array2.length);
        Change(array);
        System.out.println(Arrays.toString(array1));
        System.out.println(Arrays.toString(array2));
        System.out.println(Arrays.toString(array));

//        System.out.println(Arrays.toString(array1));
//        System.out.println(Arrays.toString(array2));

    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        if(year % 100 != 0 && year % 4 == 0 || year % 400 ==0) {
            System.out.println(year + " 是闰年");
        } else {
            System.out.println(year + " 不是闰年");
        }
    }

    public static void main2(String[] args) {
        int[] array = {1,5,9,7,3,6,2,15,10,55};
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array.length-1-i ; j++) {
                if(array[j] > array[j+1])
                {
                    int tmp = array[j];
                    array[j] = array[j+1];
                    array[j+1] = tmp;
                }
            }
        }

        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] + " ");
        }

    }

    public static void main1(String[] args) {
        int a = 10;
        int b = 1;

        int c = b + (++a);
        int d = b + (a++);
        System.out.println("c：" + c);
        System.out.println("d：" + d);
    }

    public static void main0(String[] args) {
        int num = 10;
        num += 12.5;
        System.out.println(num);

    }
}
